package com.ruoyi.business.payment.utils;

import cn.hutool.core.lang.Snowflake;
import cn.hutool.core.util.IdUtil;

public class IdGeneratorUtils {

    private IdGeneratorUtils(){}

    public static Long generateRefundId() {
        Snowflake snowflake = IdUtil.getSnowflake(1, 1); // 参数：workerId, datacenterId
        return snowflake.nextId(); // 生成64位长整型ID
    }

    public static Long generateApprovalId() {
        Snowflake snowflake = IdUtil.getSnowflake(1, 1); // 参数：workerId, datacenterId
        return snowflake.nextId(); // 生成64位长整型ID
    }

    // 生成订单号
    public static Long generateOrderId() {
        Snowflake snowflake = IdUtil.getSnowflake(1, 1); // 参数：workerId, datacenterId
        return snowflake.nextId(); // 生成64位长整型ID
    }

}
